﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Salomon/MP/Base.Master" AutoEventWireup="true" CodeBehind="CatList.aspx.cs" Inherits="WebsiteAdmin.Salomon.ProInfo.CatList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head_Title" runat="server">分类列表 - 产品</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Head_Meta" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Head_Css" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Head_Script" runat="server">
<script type="text/javascript" src="/Script/Mootools.Smoothbox.js"></script>
<script type="text/javascript" language="javascript">
    var MenuViewID = 2;
    function Del(e, t) {
        if (confirm('确定删除 “' + t + '”？')) {
            LightBox.show();
            new Request.JSON({
                method: 'post',
                url: 'Handler/CatDelete.ashx',
                data: {
                    PKID: e
                },
                noCache: true,
                onSuccess: function(data, text) {
                    if (data.Done == 'Success') {
                        alert('删除成功');
                        document.location.reload();
                    } else {
                        alert('删除失败');
                    }
                    LightBox.remove();
                },
                onFailure: function(xhr) {
                    alert(xhr.statusText);
                    LightBox.remove();
                }
            }).send();
        }
    }
</script>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Body_Top" runat="server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Body_Content" runat="server">
     <div class="infobox">
        <h3>
        <span>分类列表</span>
			<a href="/Salomon/ProInfo/CatCreate.aspx" class="add action">新建一级分类</a> <a href="/Salomon/ProInfo/CatList.aspx" class="back action">返回一级分类</a>
        </h3>
         <div class="pd05">
            <table border="0" cellpadding="0" cellspacing="1" id="tablegrid" class="tb">
			    <tr>
				    <th width="40">&nbsp;</th>
				    <th width="100">父分类</th>
				    <th >分类名称</th>
				    <th width="40">级别</th>
				    <th width="40">排序</th>
				    <th width="60">子类数</th>
				    <th width="120" colspan="2">查看</th>
				    <th width="180" colspan="3">操作</th>
			    </tr>
			    <tbody>
			    <asp:Repeater ID="RP_Cat" EnableViewState="False" runat="server" OnItemDataBound="RP_Cat_ItemDataBound">
					<ItemTemplate>
			    <tr>
				    <td><%#DataBinder.Eval(Container.DataItem, "PKID")%></td>
				    <td><asp:Label ID="ParCatName" runat="server" /></td>
				    <td><%#DataBinder.Eval(Container.DataItem, "CatName")%></td>
				    <td><%#DataBinder.Eval(Container.DataItem, "CatRank")%>级</td>
				    <td><%#DataBinder.Eval(Container.DataItem, "SortBy")%></td>
				    <td><%#DataBinder.Eval(Container.DataItem, "Num")%></td>
				    <td><asp:Label ID="ViewPar" runat="server" /></td>
				    <td><asp:Label ID="ViewCat" runat="server" /></td>
				    <td><asp:Label ID="AddCat" runat="server" /></td>
				    <td>
					    <a href="/Salomon/ProInfo/CatEdit.aspx?pkid=<%#DataBinder.Eval(Container.DataItem, "PKID")%>">修改</a>
				    </td>
				    <td>
				        <asp:Label ID="DelLink" runat="server" />
				    </td>
			    </tr>
			    </ItemTemplate>
				</asp:Repeater>
			    
			    </tbody>
            </table>
            <font style="font-size:13px; color:#666; float:right;">*只允许添加 3 级分类</font>
        </div>
    </div>


</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="Body_Foot" runat="server"  >
</asp:Content>